if(BUILD_TESTS AND NOT MSGLIB STREQUAL "None")
  add_subdirectory(messages)
	file(GLOB tests *_test.cpp)
	foreach(test ${tests})
		get_filename_component(target ${test} NAME_WE)
		add_executable(${target} ${test})
		target_link_libraries(${target} common dummy_messages mapf::elpp)
		install(TARGETS ${target} DESTINATION bin/tests/common)
		add_test(NAME ${target} COMMAND $<TARGET_FILE:${target}>)
	endforeach(test ${tests})
else()
	add_executable(encryption_test encryption_test.cpp)
	target_link_libraries(encryption_test common mapf::elpp)
	install(TARGETS encryption_test DESTINATION bin/tests/common)
	add_test(NAME encryption_test COMMAND $<TARGET_FILE:encryption_test>)
endif()
